package com.bwie.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * 商品类目
 * @TableName tb_item_cat
 */
@TableName(value ="tb_item_cat")
@Data
public class ItemCat implements Serializable {
    /**
     * 类目ID
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 父类目ID=0时，代表的是一级的类目
     */
    private Long parentId;

    /**
     * 类目名称
     */
    private String name;

    /**
     * 类型id
     */
    private Long typeId;

    @TableField(exist = false)
    private List<ItemCat> children;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;
}